package cn.candy.pet.service;

import cn.candy.basic.service.IBaseService;
import cn.candy.basic.util.PageList;
import cn.candy.pet.domain.Pet;
import cn.candy.pet.domain.SearchMasterMsg;
import cn.candy.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 寻主消息业务接口
 */
public interface ISearchMasterMsgService extends IBaseService<SearchMasterMsg> {

    /**
     * 获取所有寻主消息
     * @return
     */
    List<SearchMasterMsg> getAll();

    /**
     * 发布寻主消息
     * @param searchMasterMsg
     * @param request
     */
    void publish(SearchMasterMsg searchMasterMsg, HttpServletRequest request);

    /**
     * 查询待处理消息 - 后台系统
     * @param searchMasterMsgQuery
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> pending(SearchMasterMsgQuery searchMasterMsgQuery, HttpServletRequest request);


    /**
     * 查询已处理消息 - 后台系统
     * @param searchMasterMsgQuery
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> processed(SearchMasterMsgQuery searchMasterMsgQuery, HttpServletRequest request);

    /**
     * 查询用户寻主消息 - 前台系统
     * @param searchMasterMsgQuery
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> user(SearchMasterMsgQuery searchMasterMsgQuery, HttpServletRequest request);

    /**
     * 处理寻主消息
     * @param pet
     * @param request
     */
    void handle(Pet pet, HttpServletRequest request);
}
